﻿ @{ var ajaxOption = new AjaxOptions
    {
        HttpMethod = "GET",
        UpdateTargetId = "list",
        InsertionMode = InsertionMode.Replace,
        OnBegin = "onListBegin",
        OnSuccess = "onListSuccess",
        OnFailure = "onListFailure"
    };
}
<div class="mt4">
    @if (ViewBag.HasPrev)
    {
        @Ajax.ActionLink("<< Prev", "Index", new {id = ViewBag.PageId - 1}, ajaxOption)
    }
    
    @if (ViewBag.HasNext)
    {
        @Ajax.ActionLink("Next >>", "Index", new { id = ViewBag.PageId + 1 }, ajaxOption)
    }
</div>